package cn.chiship.framework.third.biz.wxmini.pojo.dto;

import cn.chiship.framework.common.constants.TipConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author lijian
 */
@ApiModel(value = "小程序用户注册")
public class AppletRegistrationDto {

    @ApiModelProperty(value = "用户名", required = true)
    @NotEmpty(message = "手机号" + TipConstants.NOT_EMPTY)
    @Length(min = 11, max = 11)
    private String mobile;

    @ApiModelProperty(value = "头像")
    @NotEmpty(message = "头像" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 200)
    private String avatar;

    @ApiModelProperty(value = "昵称")
    @NotNull(message = "昵称" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 100)
    private String nickName;

    @ApiModelProperty(value = "小程序唯一授权ID")
    @NotNull(message = "小程序唯一授权ID" + TipConstants.NOT_EMPTY)
    @Length(min = 1, max = 100)
    private String openId;

    @ApiModelProperty(value = "性别(0未知 1男 2女)", required = true)
    @NotNull(message = "性别" + TipConstants.NOT_EMPTY)
    @Min(0)
    @Max(2)
    private byte gender;

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public byte getGender() {
        return gender;
    }

    public void setGender(byte gender) {
        this.gender = gender;
    }
}
